package com.neuronbit.businessflow.intellij.psi;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * The type Qualified method name.
 */
@Getter
public class QualifiedMethodName {
    private final String fullClassName;
    private final String methodName;
    private final String simpleClassName;

    /**
     * Instantiates a new Qualified method name.
     *
     * @param name the name
     */
    public QualifiedMethodName(String name) {
        String n = StringUtils.strip(name, "\"");
        this.fullClassName = StringUtils.substringBeforeLast(n, ".");
        this.simpleClassName = StringUtils.substringAfterLast(fullClassName, ".");
        this.methodName = StringUtils.substringAfterLast(n, ".");
    }

}
